/*
	This file is part of Sandbox.

	Copyright (C) 2008  Marleine Daoud <marleine@gmail.com>

	Sandbox is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	Sandbox is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License 
	along with Sandbox.  If not, see <http://www.gnu.org/licenses/>.
*/

#import "search-by-linecolor.h"

@implementation SearchByLineColorUI 

-init {
	if (self = [super init])
	{
		//linecolorcheckbutton = [[CheckButton alloc] init];
	    linecolorlabel = [[[Label alloc] init] 
		    text: "Line Border Color:"];
		minusLine = [[[[Button alloc] init] label: "-"] stock: NO];
	    linecolorbox = [[[[[[HBox alloc] init] homogeneous: NO] 
				spacing: 110] 
			  //packStart: linecolorcheckbutton]
			  packStart: linecolorlabel: NO: NO: 5]
			  packStart: minusLine];
	    
	    linecolorRlabel = [[[Label alloc] init] 
		    text: "Line Color R:"];
	    linecolorGlabel = [[[Label alloc] init] 
		    text: "Line Color G:"];
	    linecolorBlabel = [[[Label alloc] init] 
		    text: "Line Color B:"];
	    linecolorAlabel = [[[Label alloc] init] 
		    text: "Line Color A:"];
		linecolorRspin = [[[[SpinButton alloc] init] 
			range: 0: 255] step: 1: 5];
		linecolorGspin = [[[[SpinButton alloc] init] 
			range: 0: 255] step: 1: 5];
		linecolorBspin = [[[[SpinButton alloc] init] 
			range: 0: 255] step: 1: 5];
		linecolorAspin = [[[[SpinButton alloc] init] 
			range: 0: 255] step: 1: 5];
		
		linecolorRbox = [[[[[[HBox alloc] init] homogeneous: NO] 
				spacing: 5] 
			  packStart: linecolorRlabel: NO: NO: 5] 
			  packStart: linecolorRspin: YES: YES: 0];
		linecolorGbox = [[[[[[HBox alloc] init] homogeneous: NO] 
				spacing: 5] 
			  packStart: linecolorGlabel: NO: NO: 5] 
			  packStart: linecolorGspin: YES: YES: 0];
		linecolorBbox = [[[[[[HBox alloc] init] homogeneous: NO] 
				spacing: 5] 
			  packStart: linecolorBlabel: NO: NO: 5] 
			  packStart: linecolorBspin: YES: YES: 0];
		linecolorAbox = [[[[[[HBox alloc] init] homogeneous: NO] 
				spacing: 5] 
			  packStart: linecolorAlabel: NO: NO: 5] 
			  packStart: linecolorAspin: YES: YES: 0];
			
		[[[[[self
			packStart: linecolorbox]
			packStart: linecolorRbox]
			packStart: linecolorGbox]
			packStart: linecolorBbox]
			packStart: linecolorAbox];
	}
}


-free {
	//[linecolorcheckbutton free];
	[linecolorlabel free];
	[linecolorbox free];
	[linecolorRlabel free];
	[linecolorGlabel free];
	[linecolorBlabel free];
	[linecolorAlabel free];
	[linecolorRspin free];
	[linecolorGspin free];
	[linecolorBspin free];
	[linecolorAspin free];
	[linecolorRbox free];
	[linecolorGbox free];
	[linecolorBbox free];
	[linecolorAbox free];
	[minusLine free];
	
	return [super free];
}

@end